# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=fl0p
pkgver=0.1
pkgrel=3
groups=('blackarch' 'blackarch-fingerprint' 'blackarch-bluetooth'
        'blackarch-sniffer')
pkgdesc='A passive L7 flow fingerprinter that examines TCP/UDP/ICMP packet sequences, can peek into cryptographic tunnels, can tell human beings and robots apart, and performs a couple of other infosec-related tricks.'
arch=('x86_64' 'aarch64')
url='http://lcamtuf.coredump.cx/'
license=('GPL2')
depends=('libpcap')
makedepends=('gzip')
source=("https://dl.packetstormsecurity.net/sniffers/$pkgname-devel.tgz")
DLAGENTS=("https::/usr/bin/curl -k -o %o %u")
sha512sums=('e6d90bec3f5fb0e71216c083016d7904b033cc25055567bf5036f8e554c04c9470c4bc3c0d407902592e2e5f6e1367b913d2d8315ec8c17612e0d225ad43f748')

build() {
  cd $pkgname

  ./Build
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/etc/$pkgname"
  install -dm 755 "$pkgdir/usr/share/doc/$pkgname"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 "$pkgname.fp" "$pkgdir/etc/$pkgname/$pkgname.fp"
  gzip fl0p.1 && install -Dm 644 "$pkgname.1.gz" \
    "$pkgdir/usr/share/man/man1/$pkgname.1.gz"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" doc/CREDITS \
    doc/ChangeLog doc/README doc/TODO
  install -Dm 644 doc/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

